﻿using System;
using System.Data;
using System.Configuration;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Web.UI.HtmlControls;

namespace Moving03
{
    public partial class WebForm3 : System.Web.UI.Page
    {
        protected void Page_Load(object sender, EventArgs e)
        {

        }

        protected void CreateUserWizard1_CreatedUser(object sender, EventArgs e)
        {

        }

        protected void CreateUserWizard1_FinishButtonClick(object sender, WizardNavigationEventArgs e)
        {
            TextBox UserNameTextBox =
            (TextBox)CreateUserWizardStep1.ContentTemplateContainer.FindControl("UserName");

            SqlDataSource DataSource =
                (SqlDataSource)CreateUserWizardStep2.FindControl("InsertExtraInfo");

            MembershipUser User = Membership.GetUser(UserNameTextBox.Text);

            object UserGUID = User.ProviderUserKey;

            DataSource.UpdateParameters.Add("UserName", UserNameTextBox.Text.ToString());

            DataSource.Update();
        }
    }
}